Fail-Safe ANSI-C Compiler: An Approach to Making C Programs Secure: Progress Report

نویسندگان

  • Yutaka Oiwa
  • Tatsurou Sekiguchi
  • Eijiro Sumii
  • Akinori Yonezawa
چکیده

It is well known that programs written in C are apt to suffer from nasty errors due to dangling pointers and/or buffer overflow. In particular, such errors in Internet servers are often exploited by malicious attackers to “crack” an entire system, which becomes even social problems nowadays. Nevertheless, it is yet unrealistic to throw away the C language at once because of legacy programs and legacy programmers. To alleviate this dilemma, many approaches to safe implementations of the C language—such as Safe C and CCured—have been proposed and implemented. To our knowledge, however, none of them support all the features of the ANSI C standard and prevent all unsafe operations. (By unsafe operations, we mean any operation that leads to “undefined behavior”, such as array boundary overrun and dereference of a pointer in a wrong type.) This paper describes a memory-safe implementation of the full ANSI C language. Our implementation detects and disallows all unsafe operations, yet conforming to the full ANSI C standard (including casts and unions) and even supporting many “dirty tricks” common in programs beyond ANSI C. This is achieved using sophisticated representations of pointers (and integers) that contain dynamic type and size information. We also devise several techniques—both compile-time and runtime—to reduce the overhead of runtime checks.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Implementation of a Fail - Safe ANSI C Compiler

Programs written in the C language often suffer from nasty errors due to dangling pointers and buffer overflow. Such errors in Internet server programs are often exploited by malicious attackers to “crack” an entire system, and this has become a problem affecting society as a whole. The root of these errors is usually corruption of on-memory data structures caused by out-of-bound array accesses...

متن کامل

CBMC-GC: An ANSI C Compiler for Secure Two-Party Computations

Secure two-party computation (STC) is a computer security paradigm where two parties can jointly evaluate a program with sensitive input data, provided in parts from both parties. By the security guarantees of STC, neither party can learn any information on the other party’s input while performing the STC task. For a long time thought to be impractical, until recently, STC has only been impleme...

متن کامل

A Controlled Experiment to Assess the Bene ts of Procedure Argument Type

Type checking is considered an important mechanism for detecting programming errors, especially interface errors. This report describes an experiment to assess the defect-detection capabilities of static, inter-module type checking. The experiment uses Ansi C and Kernighan&Ritchie (K&R) C. The relevant di erence is that the Ansi C compiler checks module interfaces (i.e., the parameter lists of ...

متن کامل

A Controlled Experiment to Assess the Benefits of Procedure Argument Type Checking

Type checking is considered an important mechanism for detecting programming errors, especially interface errors. This report describes an experiment to assess the defect-detection capabilities of static, inter-module type checking. The experiment uses Ansi C and Kernighan&Ritchie (K&R) C. The relevant diierence is that the Ansi C compiler checks module interfaces (i.e., the parameter lists of ...

متن کامل

Safe Virtual Machine for C in less than 3 KiBytes

Altreonic is using a formalised approach to embedded software engineering. One recent example is Altreonic’s novel Safe Virtual Machine for C (SVM). Tuned to the needs of embedded systems it allows to dynamically download C compiled binary code to OpenComRTOS nodes independently of the target processor. Yet, the Virtual machine requires less than 3 KiBytes of program memory (measured on an ARM ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2002